package org.example.meetingsystem.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.example.meetingsystem.entity.MeetingRoom;
import org.example.meetingsystem.enums.RoomStatus;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 会议室服务接口
 */
public interface MeetingRoomService {

    List<MeetingRoom> getAvailableRooms(Integer capacity, Boolean needProjector,
                                        Boolean needAudio, Boolean needNetwork);

    IPage<MeetingRoom> getAllRooms(Page<MeetingRoom> page);


    boolean addMeetingRoom(MeetingRoom meetingRoom);


    boolean updateMeetingRoom(Long id, MeetingRoom meetingRoom);

    boolean deleteMeetingRoom(Long id);

    List<MeetingRoom> getAllRoomStatus();

    boolean updateRoomStatus(Long id, RoomStatus status);

    MeetingRoom getRoomById(Long id);

    boolean existsById(Long id);

    boolean existsByName(String roomName, Long excludeId);

    boolean isRoomAvailable(Long roomId, LocalDateTime startTime, LocalDateTime endTime);

    long countByStatus(RoomStatus status);

    int batchUpdateStatus(List<Long> roomIds, RoomStatus status);
}